using System.Collections.Generic;

namespace DE.Sdc.SharePoint.Common.Deployment
{
    public class HierarchicalList<TOwner, TItem> : List<TItem> where TItem : NamedElement<TOwner> where TOwner : NamedElement
    {
        public HierarchicalList(TOwner owner)
        {
            Owner = owner;
        }

        public TOwner Owner { get; private set; }

        public new void Add(TItem item)
        {
            item.Parent = Owner;
            base.Add(item);
        }
    }
}